<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    
    <title>单据设置</title>
    <link rel="stylesheet" href="../../../public/dist/css/layui.css">
    <link rel="stylesheet" href="../../../css/purchaseoverdueform.css">
    <link rel="stylesheet" href="../../../public/font/iconfont.css">
</head>
<body>
<!-- 查询 -->
<div class="select">
    <div class="select-left">

        <div class="select-item">
            <div class="select-item-text" style="width: 90px">单据代号</div>
            <input type="text" class="layui-input select-item-input"  id="a" search-type="a">
        </div>
        <div class="select-item">
            <div class="select-item-text">单据名称</div>
            <input type="text" class="layui-input select-item-input" id="b" search-type="b">
        </div>

    </div>

    <div class="select-right">
        <div class="select-btn " lay-event="search">查询</div>
        <div class="select-btn " lay-event="reset">清除</div>
    </div>
</div>

<div class="common-padding">
    <table class="layui-hide" id="xtDocumentsset" lay-filter="xtDocumentsset"></table>
</div>
</body>
<script src="../../../public/dist/layui.js" charset="utf-8"></script>
<script src="../../../js/common/jquery.min.js"></script>
<script src="../../../js/common/api.js"></script>

</html>

<!-- 头部 -->
<script type="text/html" id="toolbarinter">
    <div class="layui-btn-container ">
        <button class="layui-btn  layui-btn-sm colors layui-bg-black" lay-event="add"><i class="layui-icon"></i></i>添加</button>
        <button class="layui-btn  layui-btn-sm colors  layui-bg-black" lay-event="update"><i class="layui-icon"></i>编辑</button>
        <button class="layui-btn  layui-btn-sm colors  layui-bg-black" lay-event="delete"><i class="layui-icon"></i>删除</button>
    </div>
</script>

<script>
    layui.config({
        base: "../../../js/module/"
    }).use(['Services', 'jquery'], function() {
        var $ = layui.jquery;

        var dataType = "xtDocumentsset";
        var services = new layui.Services({
            baseURL: baseaip,
            tableId: "xtDocumentsset",
            toolbar: "#toolbarinter",
            serachUrl: "dictionaries/query",
            getUrl: "dictionaries/get",
            delUrl: "dictionaries/delete",
            updUrl: "plant/updateNcpxx",
            saveUrl: "./dialog/addDocumentsset.html",
            deleteField: "id",
            dataType: dataType,
            parameter: {
                keyword: '',
                type: dataType
            },
            cols:[[
                {type: 'checkbox', fixed: 'left'},
                {field: 'a',  title: '单据代号',templet:function (data) {
                        return (JSON.parse(data.context)).a
                    }},
                {field: 'b',  title: '单据名称',templet:function (data) {
                        return (JSON.parse(data.context)).b
                    }},
                {field: 'c',  title: '单据描述',templet:function (data) {
                        return (JSON.parse(data.context)).c
                    }},
                {field: 'd',  title: '是否自动编号',templet:function (data) {
                        return (JSON.parse(data.context)).d
                    }},
                {field: 'e',  title: '前缀',templet:function (data) {
                        return (JSON.parse(data.context)).e
                    }},
                {field: 'f',  title: '后缀',templet:function (data) {
                        return (JSON.parse(data.context)).f
                    }},
                {field: 'g',  title: '单号长度',templet:function (data) {
                        return (JSON.parse(data.context)).g
                    }},
                {field: 'h',  title: '加入日期',templet:function (data) {
                        return (JSON.parse(data.context)).h
                    }},
                {field: 'i',  title: '日期格式',templet:function (data) {
                        return (JSON.parse(data.context)).i
                    }},
                {field: 'j',  title: '流水号规则',templet:function (data) {
                        return (JSON.parse(data.context)).j
                    }},
                {field: 'k',  title: '流程序号',templet:function (data) {
                        return (JSON.parse(data.context)).k
                    }},

            ]],
        });
    });
</script>